home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d12 / cbibcode.arc / GTRCRDS.C < prev    next >
Encoding:
C/C++ Source or Header  |  1991-08-05  |  611 b   |  24 lines

  1. /* Join ends of arc using getarccoords */
  2. #include <graphics.h>
  3.  
  4. main()
  5. {
  6.    int graphdriver = DETECT, graphmode;
  7.    struct arccoordstype arc_ends;
  8.  
  9. /* Initialize the graphics system */
  10.    initgraph(&graphdriver, &graphmode, "c:\\turboc");
  11.  
  12. /* Draw a 60 degree arc with radius of 100 */
  13.    arc( 150, 120, 0, 59, 100);
  14.  
  15. /* Get the coordinates of the end points of the
  16.  * arc and connect ends with a line
  17.  */
  18.    getarccoords(&arc_ends);
  19.    line( arc_ends.xstart, arc_ends.ystart, arc_ends.xend, arc_ends.yend );
  20.  
  21.  /* Wait until user hits a key, then exit */
  22.    getch();
  23.    closegraph();
  24.  }